package org.kev.transit.worker;


import org.kev.transit.StopActivity;
import android.os.Handler;
/**
 * Worker thread class that get GPS location in the background
 * @author kevin
 *
 */
public class LocationWorker implements Runnable {
	private static final String TAG = "LocationWorker";
	private StopActivity mParent = null;
	private Runnable mUiUpdater=null;
	private Handler mHandler=null;
	
	public LocationWorker(StopActivity act, Handler handler,Runnable uiUpdater){
		init(act,handler,uiUpdater);
	}
	public LocationWorker(){
		
	}
	public void init(StopActivity act, Handler handler,Runnable uiUpdater){
		mParent = act;
		mHandler=handler;
		mUiUpdater = uiUpdater;	
	}
	public void run(){
		mParent.findStop();
		
		mHandler.post(mUiUpdater);
		
		
	}

}
